<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>quick mock</title>

    <!-- Bootstrap -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
          integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">

    <style>
        body {
            font-size: 16px;
        }
    </style>
</head>
<body>
<div class="container">
    <ol class="breadcrumb">
        <li><a href="/web">Namespace</a></li>
        <li class="active">Mock</li>
    </ol>
    <h1>namespace: {{ .namespace }}</h1>
    {{ range $index, $api := .apiList}}
    <hr/>
    <div class="panel panel-primary">
        <div class="panel-heading"># {{$index}}</div>
        <div class="panel-body">
            <form class="form-horizontal">
                <!--  Path-->
                <div class="form-group">
                    <label class="col-sm-2 control-label">Path</label>
                    <div class="col-sm-10">
                        {{ range $path := $api.Path}}
                        <p class="form-control-static">{{$path.Pattern}}</p>
                        {{end}}
                    </div>
                </div>
                <!--  Method-->
                <div class="form-group">
                    <label class="col-sm-2 control-label">Method</label>
                    <div class="col-sm-10">
                        {{ range $method := $api.Method}}
                        <p class="form-control-static">{{$method.Pattern}}</p>
                        {{end}}
                    </div>
                </div>
                <!--  Header-->
                <div class="form-group">
                    <label class="col-sm-2 control-label">Header</label>
                    <div class="col-sm-10">
                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <th>key</th>
                                <th>value pattern</th>
                            </tr>
                            </thead>
                            {{ range $header := $api.Headers}}
                            <tbody>
                            <tr>
                                <td>{{$header.DataPath}}</td>
                                <td>{{$header.Pattern}}</td>
                            </tr>
                            </tbody>
                            {{end}}
                        </table>
                    </div>
                </div>
                <!--  QueryParam-->
                <div class="form-group">
                    <label class="col-sm-2 control-label">Query Params</label>
                    <div class="col-sm-10">
                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <th>key</th>
                                <th>value pattern</th>
                            </tr>
                            </thead>
                            {{ range $param := $api.QueryParam}}
                            <tbody>
                            <tr>
                                <td>{{$param.DataPath}}</td>
                                <td>{{$param.Pattern}}</td>
                            </tr>
                            </tbody>
                            {{end}}
                        </table>
                    </div>
                </div>
                <!--  Body-->
                <div class="form-group">
                    <label class="col-sm-2 control-label">Body</label>
                    <div class="col-sm-10">
                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <th>key</th>
                                <th>value pattern</th>
                            </tr>
                            </thead>
                            {{ range $body := $api.BodyJsonPattern}}
                            <tbody>
                            <tr>
                                <td>{{$body.DataPath}}</td>
                                <td>{{$body.Pattern}}</td>
                            </tr>
                            </tbody>
                            {{end}}
                        </table>
                    </div>
                </div>
                <!--  ResponseData-->
                <div class="form-group">
                    <label class="col-sm-2 control-label">ResponseData</label>
                    <div class="col-sm-10">
                        {{ $api.ResponseJsonData}}
                    </div>
                </div>
            </form>
        </div>
    </div>
    {{else}}
    <div class="jumbotron">
        <p>Empty Data</p>
    </div>
    {{end}}

</div>

</body>
</html>